package models

import (
	"time"
)

// YhOrder undefined
type Order struct {
	ID        int64     `json:"id" gorm:"id"`
	Sn        string    `json:"sn" gorm:"sn"`           // 订单ID
	UserId    int64     `json:"user_id" gorm:"user_id"` // 用户ID
	Total     float64   `json:"total" gorm:"total"`
	CreatedAt time.Time `json:"created_at" gorm:"created_at"` // 创建时间
	UpdatedAt time.Time `json:"updated_at" gorm:"updated_at"` // 创建时间
	IsAble    int8      `json:"is_able" gorm:"is_able"`
	State     int8      `json:"state" gorm:"state"` // 1:已下单   2：已发货 3：待提货 4已提货
	SendTime  time.Time `json:"send_time" gorm:"send_time"`
	TakeTime  time.Time `json:"take_time" gorm:"take_time"`
}

// TableName 表名称
func (*Order) TableName() string {
	return "dg_order"
}